#include <stdlib.h>
struct list{
	int num;
	struct list *next;
};
int main()
{
	struct list *tmp_node;
	struct list *head = (struct list*)malloc(sizeof(struct list));
	head->num = 10;
	head->next = NULL;

	/*刚开始头就是尾，这个能理解吧*/
	struct list *tail = head;

	/*添加节点*/
	tmp_node = (struct list*)malloc(sizeof(struct list));
	tmp_node->num = 3;
	tmp_node->next = NULL;
	tail->next = tmp_node; //接到尾巴上
	tail = tail->next; //因为后面有新的节点，尾巴要更新位置了，移到新节点了

	/*添加节点*/
	tmp_node = (struct list*)malloc(sizeof(struct list));
	tmp_node->num = 5;
	tmp_node->next = NULL;
	tail->next = tmp_node;
	tail = tail->next;

	/*添加节点*/
	tmp_node = (struct list*)malloc(sizeof(struct list));
	tmp_node->num = 80;
	tmp_node->next = NULL;
	tail->next = tmp_node;
	tail = tail->next;



	return 0;
}
